<script setup>
import { inject, ref } from 'vue';

const gbm = inject('gbm')

const cgmHandler = inject('cgm')

const inputVal = ref('')
const submitHandler = ()=>{
    cgmHandler(inputVal.value)
    //gbm.value = inputVal.value
}
</script>

<template>
    <div>
        <p>{{ gbm }}</p>
        <input type="text" v-model="inputVal" placeholder="请输入修改内容" @keydown.enter="submitHandler">
    </div>
</template>